import request from '@/common/request.js'

const task_api={}

// 添加任务
task_api.addTask = data => request.globalRequest({
	methods: 'POST',
	url: '/api/task/add',   
	data: data, 
}) 

// 获取项目列表
task_api.getTaskList = data => request.globalRequest({
	methods: 'POST',
	url: '/api/task/list',   
	data: data, 
}) 

// 编辑项目
task_api.editTask = data => request.globalRequest({
	
	methods: 'POST',
	url: '/api/task/edit',   
	data: data, 
}) 

// 删除项目
task_api.changestatus = data => request.globalRequest({
	methods: 'POST',
	url: '/api/task/changestatus',   
	data: data, 
}) 

// 删除项目
task_api.delTask = data => request.globalRequest({
	methods: 'POST',
	url: '/api/task/del',   
	data: data, 
}) 

//获取单个任务信息
task_api.getTaskInfo = data => request.globalRequest({
	methods: 'POST',
	url: '/api/task/info',   
	data: data, 
}) 

//获取任务进度
task_api.getTaskRate = data => request.globalRequest({
	methods: 'GET',
	url: '/api/task/rate',   
	data: data, 
}) 



//任务记录

// 添加任务
task_api.addTaskCord = data => request.globalRequest({
	methods: 'POST',
	url: '/api/taskrecord/add',   
	data: data, 
}) 

// 获取项目列表
task_api.getTaskCordList = data => request.globalRequest({
	methods: 'POST',
	url: '/api/taskrecord/list',   
	data: data, 
}) 

// 编辑项目
task_api.editTaskCord = data => request.globalRequest({
	methods: 'POST',
	url: '/api/taskrecord/edit',   
	data: data, 
}) 

//获取单个任务信息
task_api.getTaskCordInfo = data => request.globalRequest({
	methods: 'POST',
	url: '/api/taskrecord/info',   
	data: data, 
}) 

// 删除任务记录
task_api.delTaskCord = data => request.globalRequest({
	methods: 'POST',
	url: '/api/taskrecord/del',   
	data: data, 
}) 

export default task_api